﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Vit.Web.Mvc.DataAnnotations;

namespace Vit.Web.Models
{
    [Operation("List", "CategoryProperties", 1, LinkUrlPattern = "/Admin/CategoryItem/Properties/{Name}", CssClass = "dialog")]
    public class CategoryItem
    {
        [Key]
        [StringLength(50)]
        [Required]
        public string Name { get; set; }

        [StringLength(200)]
        [DataType(DataType.MultilineText)]
        public string Groups { get; set; }

        [StringLength(200)]
        public string LinkUrl { get; set; }

        [StringLength(200)]
        public string ImageUrl { get; set; }

        public int Order { get; set; }

        public virtual CategoryItem Parent { get; set; }
        public virtual ICollection<CategoryItem> Items { get; set; }
    }
}